home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIXPIDialogService.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  110 lines

  1. /* ***** BEGIN LICENSE BLOCK *****
  2.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  3.  *
  4.  * The contents of this file are subject to the Mozilla Public License Version
  5.  * 1.1 (the "License"); you may not use this file except in compliance with
  6.  * the License. You may obtain a copy of the License at
  7.  * http://www.mozilla.org/MPL/
  8.  *
  9.  * Software distributed under the License is distributed on an "AS IS" basis,
  10.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11.  * for the specific language governing rights and limitations under the
  12.  * License.
  13.  *
  14.  * The Original Code is the Mozilla XPInstall.
  15.  *
  16.  * The Initial Developer of the Original Code is
  17.  * Netscape Communications Corporation.
  18.  * Portions created by the Initial Developer are Copyright (C) 2002
  19.  * the Initial Developer. All Rights Reserved.
  20.  *
  21.  * Contributor(s):
  22.  *      Daniel Veditz <dveditz@netscape.com>
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39.  
  40. interface nsIDOMWindow;
  41. interface nsIXPIProgressDialog;
  42. interface nsIObserver;
  43.  
  44. /**
  45.  * A service provided by embedding applications to override
  46.  * the default XUL implmementation of XPInstall dialogs.
  47.  *
  48.  * Embedding applications which wish to override the default
  49.  * XUL dialogs need to create a component which implements
  50.  * this interface and registers with the Contract ID
  51.  * "@mozilla.org/embedui/xpinstall-dialog-service;1"
  52.  *
  53.  * @status UNDER_REVIEW
  54.  */
  55. [scriptable, uuid(8cdd8baa-1dd2-11b2-909a-f0178da5c5ff)]
  56. interface nsIXPIDialogService : nsISupports
  57. {
  58.     /**
  59.      * @brief  Ask the user if it's OK to install
  60.      *
  61.      * When called the XPIDialogService implementation should pose an
  62.      * install confirmation dialog and return the user's response
  63.      *
  64.      * @param parent        a window that can be used to parent the modal dialog
  65.      *
  66.      * @param packageList   For each install package there will be three strings,
  67.      *                      a display name, a source URL, and a the name of the
  68.      *                      organization that signed this install.  Note that the
  69.      *                      name of the signer is not verified.  Verification
  70.      *                      happens when the the install has completely downloaded.
  71.      *                      Your user interface should only suggest that the 
  72.      *                      install may be signed by this organization name.
  73.      *                      Note that an unsigned archive is indicated by an 
  74.      *                      empty string.   
  75.      *
  76.      * @param count         The number of strings in the packageList. This
  77.      *                      will always be three times the number of 
  78.      *                      packages.
  79.      *
  80.      * @return true to install, false to cancel
  81.      */
  82.     boolean confirmInstall(in nsIDOMWindow parent,
  83.                            [array, size_is(count)] in wstring packageList,
  84.                            in unsigned long count);
  85.  
  86.     /**
  87.      * @brief Create and open a download-and-install progress dialog
  88.      *
  89.      * When called the XPIDialogService implementation creates and opens
  90.      * a dialog to display the status of the install. When the dialog
  91.      * is ready to be used then the observer must be called: the subject
  92.      * is an nsIXPIProgressDialog that nsXPInstallManager can use to control
  93.      * the dialog, the topic is "xpinstall-progress"  and the data is "open".
  94.      *
  95.      * If the user wishes to cancel the download, the dialog can call the
  96.      * observe method with the same subject and topic and the data "cancel".
  97.      *
  98.      * @note Unless this routine throws an exception the observer <b>must</b>
  99.      * be called or nsXPInstallManager will wait forever and never clean
  100.      * itself up.
  101.      *
  102.      * @param packageList   three strings per package as in confirmInstall()
  103.      * @param count         the number of strings in the list
  104.      * @param observer      nsIObserver to receive messages from the dialog
  105.      */
  106.     void openProgressDialog([array, size_is(count)] in wstring packageList,
  107.                             in unsigned long count,
  108.                             in nsIObserver observer);
  109. };
  110.